﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;

namespace Thor.Repository.Azure.Table
{
    internal class InvalidLogonRow : TableServiceEntity
    {
                #region Constructors

        public InvalidLogonRow() : base() { }

        public InvalidLogonRow(string applicationName, string appointmentId)
            : base(applicationName, appointmentId)
        {
            ApplicationName = applicationName;
            
        }

        #endregion

        #region Properties

        /// <summary>
        /// Name of the application accessing the table.
        /// </summary>
        public string ApplicationName { get; set; }

        /// <summary>
        /// Username associated with the invalid logon.
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// Number of times the invalid logon has been tried.
        /// </summary>
        public int AttemptCount { get; set; }

        /// <summary>
        /// First time the invalid logon was been tried.
        /// </summary>
        public DateTime FirstAttemptTimestamp { get; set; }

        /// <summary>
        /// Last time the invalid logon was tried.
        /// </summary>
        public DateTime LastAttemptTimestamp { get; set; }

        /// <summary>
        /// Unique id of the invalid logon.
        /// </summary>
        public Guid Id { get; set; }

        #endregion
    }
}
